package com.cn.hnust.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cn.hnust.dao.TavernMapper;
import com.cn.hnust.pojo.Tavern;
import com.cn.hnust.service.ITavernService;
import com.cn.hnust.util.Page;

@Service("tavernService")
public class TavernServiceimpl implements ITavernService {
	@Autowired
	private TavernMapper TavernDao;
	 public Tavern getUserById(Integer userId) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	
	public List<Tavern> getUsers() {
		// TODO Auto-generated method stub
		return TavernDao.getUsers();
	}

	
	public Tavern getUser(int tavern_id) {
		// TODO Auto-generated method stub
		return TavernDao.getUser(tavern_id);
	}

	
	public int insert(Tavern tavern) {
		// TODO Auto-generated method stub
		return TavernDao.insert(tavern);
	}

	
	public List<Tavern> selectPersons(String tavern_name, Page page) {
		// TODO Auto-generated method stub
		return null;
	}

	
	public List<Tavern> queryAllRecord(Page page) {
		// TODO Auto-generated method stub
		return TavernDao.queryAllRecord(page);
	}

	
	public int getCount() {
		// TODO Auto-generated method stub
		return TavernDao.getCount();
	}

	
	public int updateByPrimaryKey(Tavern tavern) {
		// TODO Auto-generated method stub
		return TavernDao.updateByPrimaryKey(tavern);
	}

	
	public int getCountmh(String tavern_name) {
		// TODO Auto-generated method stub
		return 0;
	}

	
	public int delTavern(int tavern_id) {
		// TODO Auto-generated method stub
		return TavernDao.deleteByPrimaryKey(tavern_id);
	}

}
